<!--
 * @Author: liu-tiezhu1 1471528799@qq.com
 * @Date: 2023-11-20 17:03:24
 * @LastEditors: liu-tiezhu1 1471528799@qq.com
 * @LastEditTime: 2023-11-25 10:34:29
 * @FilePath: \customer-relations\src\views\Message\Todo\todoTable\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <el-button @click="changeOn">待审批</el-button>
    <el-button @click="changeOi">已审批</el-button>
    <hr />

    <!-- 动态切换组件 -->
    <component :is="currentComponent"></component>


    <!-- <el-table :data="data" border style="width: 100%">
        <el-table-column type="selection" />
        <el-table-column prop="approval_id" label="审批编号" />
        <el-table-column prop="approval_type" label="审批类型" />
        <el-table-column prop="status" label="当前状态" />
        <el-table-column prop="request_user" label="申请人" />
        <el-table-column prop="request_date" label="申请时间" />
        <el-table-column  label="操作">
            <el-button @click="setDialogVisible(true)">查看</el-button>
            <el-button>审批</el-button>
        </el-table-column>
    </el-table>
    <div class="yuyuyu">
        <el-pagination :page-sizes="[10, 20, 30, 100]" layout="total, sizes, prev, pager, next, jumper" :total="total" 
        @current-change="page=>loadData(page)"
        />
    </div> -->
</template>

<script setup lang="ts">

import { ref } from 'vue';
import daishengpi from '@/views/Message/Todo/todoTable/daishengpi.vue'
import yishengpi from '@/views/Message/Todo/todoTable/yishengpi.vue'


const currentComponent = ref<object>(yishengpi)

function changeOn() {
    currentComponent.value = yishengpi
}
function changeOi() {
    currentComponent.value = daishengpi
}


// interface IProps{
//     total:number
//     data:Imessage.Xiaoxi[]
//     loadData:(page?: number) => Promise<void>
//     setDialogVisible:(visible:boolean)=>void
// }

// const props=defineProps<IProps>()






</script>

<style lang="scss" scoped>
.yuyuyu {
    width: 600px;
    margin: auto;
    margin-top: 15px;
}
</style>